xenstore: call add_change_node() directly when writing node
authorJuergen Gross <jgross@suse.com>
Mon, 5 Dec 2016 07:48:43 +0000 (08:48 +0100)
committerWei Liu <wei.liu2@citrix.com>
Mon, 5 Dec 2016 11:21:29 +0000 (11:21 +0000)
commitb4b475c3ace316589fb9b68f9d4ee9425a1a2349
tree0d7874380cc73cf36c67f7482b53ca0838ec0064
parent2a29eec174227123b3b814da39cf6c333323667a
xenstore: call add_change_node() directly when writing node

Instead of calling add_change_node() at places where write_node() is
called, do that inside write_node().

Note that there is one case where add_change_node() is called now when
a later failure will prohibit the changed node to be written: in case
of a write_node failing due to an error in tdb_store(). As the only
visible change of behavior is a stale event fired for the node, while
the failing tdb_store() signals a corrupted xenstore database, the
stale event will be the least problem of this case.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/xenstore/xenstored_core.c